package com.whm.hrmanagement.service.impl;

import java.util.List;
import com.whm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.whm.hrmanagement.mapper.OaSocCityMapper;
import com.whm.hrmanagement.domain.OaSocCity;
import com.whm.hrmanagement.service.IOaSocCityService;

/**
 * 参保城市Service业务层处理
 * 
 * @author whm
 * @date 2024-02-09
 */
@Service
public class OaSocCityServiceImpl implements IOaSocCityService 
{
    @Autowired
    private OaSocCityMapper oaSocCityMapper;

    /**
     * 查询参保城市
     * 
     * @param id 参保城市主键
     * @return 参保城市
     */
    @Override
    public OaSocCity selectOaSocCityById(String id)
    {
        return oaSocCityMapper.selectOaSocCityById(id);
    }

    /**
     * 查询参保城市列表
     * 
     * @param oaSocCity 参保城市
     * @return 参保城市
     */
    @Override
    public List<OaSocCity> selectOaSocCityList(OaSocCity oaSocCity)
    {
        return oaSocCityMapper.selectOaSocCityList(oaSocCity);
    }

    @Override
    public List<OaSocCity> allgetCity() {
        return oaSocCityMapper.selectOaSocCityList(new OaSocCity());

    }

    /**
     * 新增参保城市
     * 
     * @param oaSocCity 参保城市
     * @return 结果
     */
    @Override
    public int insertOaSocCity(OaSocCity oaSocCity)
    {
        oaSocCity.setCreateTime(DateUtils.getNowDate());
        return oaSocCityMapper.insertOaSocCity(oaSocCity);
    }

    /**
     * 修改参保城市
     * 
     * @param oaSocCity 参保城市
     * @return 结果
     */
    @Override
    public int updateOaSocCity(OaSocCity oaSocCity)
    {
        oaSocCity.setUpdateTime(DateUtils.getNowDate());
        return oaSocCityMapper.updateOaSocCity(oaSocCity);
    }

    /**
     * 批量删除参保城市
     * 
     * @param ids 需要删除的参保城市主键
     * @return 结果
     */
    @Override
    public int deleteOaSocCityByIds(String[] ids)
    {
        return oaSocCityMapper.deleteOaSocCityByIds(ids);
    }

    /**
     * 删除参保城市信息
     * 
     * @param id 参保城市主键
     * @return 结果
     */
    @Override
    public int deleteOaSocCityById(String id)
    {
        return oaSocCityMapper.deleteOaSocCityById(id);
    }
}
